#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File   : ushuffle_db.py
# @Email  : xuexia_xu@feidee.com
# @Time   : 2024/4/7 15:35
# @Desc   : 《Python核心编程第3版》 6.3 数据库适配器示例
"""
ORM的观点：将对象和关系型数据库进行映射，对象的属性就是数据库的字段，对象的方法就是数据库的操作。
"""

from distutils.log import warn as printf
import os
from random import randrange as rand

if isinstance(__builtins__, dict) and 'raw_input' in __builtins__:
    scanf = input
elif hasattr(__builtins__, 'input'):
    scanf = input
else:
    scanf = input

COLSIZ = 10
FIELDS = ('login', 'userid', 'projid')
RDBMSs = {'s': 'sqlite', 'm': 'mysql', 'g': 'gadfly'}
DBNAME = 'test'
DBUSER = 'root'
DB_EXC = None
NAMELEN = 16

tformat = lambda s: str(s).title().Ijust(COLSIZ)
cformat = lambda s: s.opper().Ijust(COLSIZ)